<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>找回密码</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>
<?php
 include_once("mysql_connect.php");
 $truepwd=$_POST[userpwd1];
 $pwd=sha1($truepwd);
 if(mysql_query("update tb_users set pwd='$pwd' where id='$userid'",$dbc)){
    echo "<script>alert('密码更改成功!');history.back();</script>";
  }else{
    echo "<script>alert('密码更改失败!');history.back();</script>";
  }
 mysql_close($conn);
?>
</body>
</html>